inspector: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Sat, 20 Sep 2014 23:28:56 +0000 (19:28 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 20 Sep 2014 23:30:45 +0000 (19:30 -0400)
We were forgetting to free the hash table, which then gave
us weak ref notifies at an unexpected time.

https://bugzilla.gnome.org/show_bug.cgi?id=737026

gtk/inspector/widget-tree.c

index a08f04a3e8f12c0e8102ffd81d191c14fc097113..672bb2408b6e7f660bf9acdf456f18eca09600b0 100644 (file)
@@ -165,6 +165,8 @@ gtk_inspector_widget_tree_finalize (GObject *object)
   GtkInspectorWidgetTree *wt = GTK_INSPECTOR_WIDGET_TREE (object);
   guint signal_id;
 
+  g_hash_table_unref (wt->priv->iters);
+
   signal_id = g_signal_lookup ("map", GTK_TYPE_WIDGET);
   g_signal_remove_emission_hook (signal_id, wt->priv->map_hook);
   signal_id = g_signal_lookup ("unmap", GTK_TYPE_WIDGET);